<!-- 完善简历 -->
<template>
	<view class="page">
		<!-- 顶部导航栏 -->
		<view class="tabbar">
			<view class="tabbar-title flex justify-center align-center" :style="{'paddingTop': tabbarTop}">
				<view class="icon" @click="back">
					<image src="https://sanfuzhide.oss-cn-hangzhou.aliyuncs.com/circle/linkbank.png" mode=""></image>
				</view>
				<view class="title flex justify-center align-center">
					完善简历
				</view>
			</view>
		</view>
		<view class="content" style="height: calc(100vh - 176rpx - 145rpx - env(safe-area-inset-bottom));">
			<scroll-view scroll-y="true" style="height: 100%;" class="scroll">
				<!-- 在线简历 -->
				<view class="resume">
					<view class="items flex align-center">
						<view class="icon">

						</view>
						<view class="title flex">
							我的在线简历
						</view>
					</view>
					<OnlineResume :titleName="titleName[0]">
						<view class="con text-ellipsis2">
							{{resume.con}}
						</view>
					</OnlineResume>
					<view class="u-lineop">

					</view>
					<OnlineResume :titleName="titleName[1]">
						<view class="tree" v-for="item in resume.tree" :key="item.id">
							<view class="top flex align-center">
								<view class="left">
									{{item.name}}
								</view>
								<view class="right">
									{{item.salary}}
								</view>
							</view>
							<view class="bot flex align-center">
								<view class="left">
									{{item.city}}
								</view>
								<view class="right">
									{{item.industry}}
								</view>
							</view>
						</view>
					</OnlineResume>
					<view class="u-lineop">

					</view>
					<OnlineResume :titleName="titleName[2]">
						<view class="work" v-for="item in resume.work" :key="item.id">
							<view class="company flex justify-between align-center">
								<view class="name">
									{{item.name}}
								</view>
								<view class="date">
									{{item.date}}
								</view>
							</view>
							<view class="professional">
								{{item.professional}}
							</view>
							<view class="text">
								{{item.content}}
							</view>
						</view>
					</OnlineResume>
					<view class="u-lineop">

					</view>
					<OnlineResume :titleName="titleName[3]">
						<view class="work" v-for="item in resume.project" :key="item.id">
							<view class="company flex justify-between align-center">
								<view class="name">
									{{item.name}}
								</view>
								<view class="date">
									{{item.date}}
								</view>
							</view>
							<view class="professional">
								{{item.professional}}
							</view>
							<view class="text">
								{{item.content}}
							</view>
						</view>
					</OnlineResume>
					<view class="u-lineop">

					</view>
					<OnlineResume :titleName="titleName[4]">
						<view class="work" v-for="item in resume.education" :key="item.id">
							<view class="company flex justify-between align-center">
								<view class="name">
									{{item.name}}
								</view>
								<view class="date">
									{{item.date}}
								</view>
							</view>
							<text class="professional" style="margin-right: 20rpx;">
								{{item.education}}
							</text>
							<text class="text">
								{{item.professional}}
							</text>
						</view>
					</OnlineResume>
				</view>
			</scroll-view>
		</view>
		<view class="bottom">
			<view class="btnn flex justify-center align-center" @click="submit">
				立即提交
			</view>
		</view>
		<view v-if="show" class="mask flex justify-center align-center">
			<view class="car">
				<view class="icon flex justify-center align-center" @click="cancel">
					<image src="https://sanfuzhide.oss-cn-hangzhou.aliyuncs.com/chance/cancel.png" mode=""></image>
				</view>
				<view class="botn">
					<view class="b3">
						是否立即请<text>大厂专家</text>修改简历，提高投递成功率？
					</view>
					<view class="b4 flex justify-between align-center">
						<view class="left flex justify-center align-center" @click="cancel">
							取消
						</view>
						<view class="right flex justify-center align-center" @click="link">
							立即完善
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		resume
	} from '@/data/my.js'
	import OnlineResume from '@/components/onlineResume/onlineResume.vue'
	export default {
		components: {
			OnlineResume
		},
		data() {
			return {
				tabbarTop: 0,
				resume,
				show: true,
				titleName: resume.titleName
			}
		},
		onLoad() {
			this.init()
		},
		methods: {
			//初始化
			init() {
				this._setTabbarTitleHeight()
			},
			//提交按钮
			submit() {

			},
			//取消按钮
			cancel() {
				this.show = false
			},
			//去完善资料
			link() {
				this.show = false

			},
			//设置title高度
			_setTabbarTitleHeight() {
				let top = uni.getStorageSync('tabbarCapsule')
				this.tabbarTop = top.top + 'px'
			},
			//返回按钮
			back() {
				uni.navigateBack({
					delta: 0
				})
			}
		}
	}
</script>

<style lang="scss">
	.page {
		.tabbar {
			width: 750rpx;
			height: 176rpx;
			background: linear-gradient(135deg, #1C79F8, #0265EB);
			position: relative;

			.tabbar-title {

				.icon {
					width: 40rpx;
					height: 40rpx;
					margin-left: 20rpx;
				}

				.title {
					width: 100%;
					padding-right: 70rpx;
					font-size: 40rpx;
					color: #FFFFFF;
					font-weight: 600;
				}
			}
		}

		.content {
			padding: 0 30rpx;

			.scroll {
				padding: 30rpx 0 0;

				.resume {
					.items {
						.icon {
							width: 4rpx;
							height: 29rpx;
							background: #0265EB;
							margin-right: 20rpx;
						}

						.title {
							font-weight: bold;
							color: #333333;
							font-size: 32rpx;
						}
					}

					// 个人优势
					.con {
						margin-top: 20rpx;
						font-weight: 500;
						color: #333333;
						font-size: 28rpx;
					}

					// 求职期望
					.tree {
						margin-top: 20rpx;

						.top {
							font-weight: 500;
							color: #333333;
							font-size: 28rpx;
							line-height: 1;
							margin-top: 20rpx;

							.left {
								margin-right: 10rpx;
							}
						}

						.bot {
							font-weight: 500;
							color: #666666;
							font-size: 24rpx;
							line-height: 1;
							margin-top: 20rpx;

							.left {
								margin-right: 10rpx;
							}
						}
					}

					// 工作经历
					.work {
						.company {
							margin-top: 20rpx;

							.name {
								font-weight: 500;
								color: #333333;
								font-size: 28rpx;
							}

							.date {
								font-weight: 500;
								color: #999999;
								font-size: 24rpx;
							}
						}

						.professional {
							font-weight: 500;
							color: #666666;
							font-size: 24rpx;
							margin-top: 20rpx;
						}

						.text {
							font-weight: 500;
							color: #666666;
							font-size: 24rpx;
							margin-top: 20rpx;
						}
					}
				}
			}
		}

		.bottom {
			padding: 20rpx 30rpx 0;
			background: #FFFFFF;
			position: fixed;
			bottom: calc(20rpx + env(safe-area-inset-bottom));
			left: 0;

			.btnn {
				width: 690rpx;
				height: 75rpx;
				background: #0265EB;
				border-radius: 38rpx;
				font-weight: 500;
				color: #FFFFFF;
				font-size: 32rpx;
				line-height: 1;
				box-shadow: 0rpx 10rpx 10rpx rgba(12, 108, 240, .4);
			}
		}

		.mask {
			background: rgba(0, 0, 0, 0.4);
			height: 100vh;

			.car {
				width: 547rpx;
				height: 458rpx;
				margin-left: -13rpx;
				background-image: url('https://sanfuzhide.oss-cn-hangzhou.aliyuncs.com/chance/runamebc.png');
				background-repeat: no-repeat;
				background-size: 100% 100%;
				border-radius: 24rpx;
				position: relative;

				.icon {
					width: 26rpx;
					height: 26rpx;
					position: absolute;
					right: 30rpx;
					top: 97rpx;
				}

				.botn {
					padding: 30rpx 30rpx 60rpx;
					font-weight: 500;
					color: #333333;
					font-size: 28rpx;
					line-height: 1;

					.b3 {
						margin-top: 190rpx;
						margin-left: 13rpx;
						font-weight: 500;
						color: #333333;
						font-size: 28rpx;
						line-height: 36rpx;
						text{
							font-weight: bold;
							color: #0265EB;
							font-size: 28rpx;
							line-height: 36rpx;
						}
					}

					.b4 {
						margin-top: 47rpx;
						margin-left: 13rpx;

						.left {
							width: 217rpx;
							height: 70rpx;
							border: 2rpx solid #0265EB;
							border-radius: 8rpx;
							color: #0265EB;
						}

						.right {
							width: 217rpx;
							height: 70rpx;
							background: linear-gradient(90deg, #2F93FE, #171EBC);
							border-radius: 8rpx;
							font-weight: bold;
							color: #FFFFFF;
							line-height: 36rpx;
							text-shadow: 3rpx 3rpx 2rpx rgba(4, 14, 145, 0.4);
							box-shadow: 0rpx 10rpx 10rpx rgba(12, 108, 240, .4);
						}
					}
				}

				.imgss {
					width: 134rpx;
					height: 99rpx;
					position: absolute;
					left: -42rpx;
					top: -23rpx;
				}
			}
		}
	}
</style>
